var utils = require("../../../utils/util.js");
var app = getApp();
Page({
  data: {
    dominameImg:utils.dominameImg,
    // orderInfo:{
    //   reserve_pic:'',
    //   reserve_date:''
    // }
  },
  onLoad:function(options){
    let that = this;
    wx.showLoading();
    wx.request({
      url: utils.dominame + '/api/reserveOrderDetail',
      data: {
        token: app.globalData.token,
        order_no: options.orderno,
      },
      header: { "Content-Type": "application/x-www-form-urlencoded" },
      method: 'GET',
      dataType: 'json',
      responseType: 'text',
      success: function (res) {
        console.log(res);
        if (res.data.code == 0) {
          that.setData({
            orderInfo: res.data.data.reserve_order
          });
        } else {
          wx.showToast({
            title: res.data.msg,
            icon: "none"
          })
        }
      },
      fail: function (res) { },
      complete: function (res) {
        wx.hideLoading();
      },
    })
  },
  submitOrder:function(){
    wx.navigateTo({
      url: '../../payChoose/payChoose',
    })
  }
})